<%--
  Created by IntelliJ IDEA.
  User: 31921
  Date: 2024/12/15
  Time: 17:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html; charset=UTF-8" language="java"
pageEncoding="UTF-8" %>
<%@ page import="com.Student" %>
<html>
    <head>
        <title>新增学生</title>
        <style>
            body {
                font-family: Arial, sans-serif;
                background-color: #f4f4f4;
                margin: 0;
                padding: 0;
            }
            .header {
                background-color: #4cafa7;
                color: white;
                padding: 15px;
                text-align: center;
            }
            .container {
                padding: 20px;
                max-width: 600px;
                margin: 0 auto;
                background-color: white;
                box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
                border-radius: 8px;
            }
            h2 {
                text-align: center;
            }
            .form-group {
                margin-bottom: 15px;
            }
            label {
                display: block;
                margin-bottom: 5px;
                font-weight: bold;
            }
            input[type="text"], input[type="email"], input[type="number"], input[type="tel"], select {
                width: 100%;
                padding: 10px;
                margin: 5px 0;
                border-radius: 4px;
                border: 1px solid #ddd;
            }
            .button {
                background-color: #afaa4c;
                color: white;
                padding: 10px 15px;
                text-decoration: none;
                border-radius: 4px;
                /*width: 100%;*/
                margin-top: 20px;
                display: inline-block;
                /*text-align: center;*/
            }
            .button:hover {
                background-color: #a06045;
            }
        </style>
    </head>
    <body>

        <!-- 头部 -->
        <div class="header">
            <h1>新增学生</h1>
        </div>


        <div class="container">
            <!-- 返回上一级按钮 -->
            <a href="studentManagement" class="button">返回</a>

            <!-- 新增学生表单 -->
            <h2>新增学生信息</h2>
            <form action="addStudent" method="POST">
                <div class="form-group">
                    <label for="studentId">学号</label>
                    <input type="text" id="studentId" name="studentId" required placeholder="请输入学号" />
                </div>
                <div class="form-group">
                    <label for="name">姓名</label>
                    <input type="text" id="name" name="name" required placeholder="请输入姓名" />
                </div>
                <div class="form-group">
                    <label for="gender">性别</label>
                    <select id="gender" name="gender" required>
                        <option value="">选择性别</option>
                        <option value="男">男</option>
                        <option value="女">女</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="age">年龄</label>
                    <input type="number" id="age" name="age" required placeholder="请输入年龄" min="1" max="100" />
                </div>
                <div class="form-group">
                    <label for="email">邮箱</label>
                    <input type="email" id="email" name="email" required placeholder="请输入邮箱" />
                </div>
                <div class="form-group">
                    <label for="phone">电话</label>
                    <input type="tel" id="phone" name="phone" required placeholder="请输入电话" />
                </div>
                <button type="submit" class="button">提交</button>
            </form>
        </div>

    </body>
</html>

